package com.hbsx.service.impl;

import com.hbsx.dao.TbUserMapper;
import com.hbsx.entity.TbUser;
import com.hbsx.service.TbUserService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;


/**
 * 用户表(TbUser)表服务实现类
 *
 * @author makejava
 * @since 2021-01-12 18:40:27
 */
@Service
public class TbUserServiceImpl implements TbUserService {

    @Resource
    private TbUserMapper tbUserMapper;


    @Override
    public TbUser selectByUsername(String usernname) {
        Example example = new Example(TbUser.class);
        example.createCriteria().andEqualTo("username",usernname);
        return tbUserMapper.selectOneByExample(example);
    }
}